import { DEFAULT_LAYOUT } from '../base';
import type { AppRouteRecordRaw } from '../types';

const Admin: AppRouteRecordRaw = {
  path: '/admin',
  name: 'Admin',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '管理页',
    requiresAuth: true,
    roles: ['admin'],
    icon: 'icon-list',
    order: 1
  },
  children: [
    {
      path: 'user',
      name: 'User',
      component: () => import('@/views/admin/user/index.vue'),
      meta: {
        locale: '用户管理'
      }
    },
    {
      path: 'announcement',
      name: 'Announcement',
      component: () => import('@/views/admin/Announcement/index.vue'),
      meta: {
        locale: '公告管理'
      }
    },
    {
      path: 'sign',
      name: 'Sign',
      component: () => import('@/views/admin/Sign/index.vue'),
      meta: {
        locale: '签到管理'
      }
    },
    {
      path: 'fileInfo',
      name: 'FileInfo',
      component: () => import('@/views/admin/fileInfo/index.vue'),
      meta: {
        locale: '文件管理'
      }
    }
  ]
};

export default Admin;
